package Threadprojects.pro1_matrix.row;

public class RowTask implements Runnable {
    final double[][] rs;
    final double[][] m1;
   final double[][] m2;
   final int i;


    public RowTask(double[][] rs, double[][] m1, double[][] m2, int i) {
        this.rs = rs;
        this.m1 = m1;
        this.m2 = m2;
        this.i = i;

    }

    @Override
    public void run() {
        for (int j = 0; j < m2[0].length; j++) {
            rs[i][j] = 0;
            for (int k = 0; k < m1[0].length; k++) {
                rs[i][j] += m1[i][k] * m2[k][j];
            }
        }

    }
}
